Skip to content

fix(profile): apply app filter lists once the list index is available - #2323

Closed
0n113 wants to merge 386 commits into
safing:developmentfrom
0n113:fix/profile-filterlists-first-start
Closed

0n113 wants to merge 386 commits into
safing:developmentfrom
0n113:fix/profile-filterlists-first-start

Conversation

@0n113

@0n113 0n113 commented Nov 20, 2026

Copy link
Copy Markdown

Problem

On the first start the filter list index is not downloaded yet. App profiles with their own filter lists logged profiles: failed to resolve filter list IDs: file not found and silently used the global filter lists until the profile was reloaded for some other reason (settings change, core restart).

Fix

  • Profile.parseConfig: updates.ErrNotFound from ResolveListIDs marks the profile's filter lists as pending (debug log instead of a warning). Other errors still warn.
  • updateGlobalConfigProfile already retries every 15 s until the index is there (Update to latest portbase updater changes and register index files #48). When its filter lists resolve, all active profiles with pending lists are marked outdated, so LayeredProfile.Update reloads them on their next use.

Tests

  • New TestReloadProfilesWithPendingFilterLists.
  • go test ./service/profile/, golangci-lint (new-from-rev): clean.
  • Linux VM smoke test: see comment.

🤖 Generated with Claude Code

0n113 and others added 30 commits November 17, 2026 03:40
…nlockForUsage

UnlockForUsage released the read lock on the layered profile first and only
then iterated lp.layers to read-unlock every layer. As soon as the layered
profile lock is released, a concurrent LayeredProfile.Update (called by
the firewall for another connection of the same process when a layer is
outdated, eg. after the user changed the app settings) can take the write
lock and replace lp.layers[i] with the new profile version.

UnlockForUsage then reads lp.layers unsynchronized (data race) and calls
RUnlock on the new layer, which it never locked, instead of the old one:
- if the new layer is not read-locked by anyone, the runtime aborts the
  whole process with "fatal error: sync: RUnlock of unlocked RWMutex";
- otherwise it steals another reader's lock, and the old layer stays
  read-locked forever, so any later Lock() of it blocks indefinitely.

Fix: read-unlock the layers while still holding the layered profile read
lock, so the set of unlocked layers is the set that LockForUsage locked.

Proof: TestLayeredProfileUnlockForUsageDuringUpdate (LockForUsage, newer
profile becomes active, concurrent Update, UnlockForUsage). Before, with
-race: "WARNING: DATA RACE" write at (*LayeredProfile).Update()
(profile-layered.go:288, lp.layers[i] = newLayer) vs. previous read at
(*LayeredProfile).UnlockForUsage() (profile-layered.go:171); without
-race, -count=20 crashed the test binary with "fatal error: sync: RUnlock
of unlocked RWMutex". After: passes -race -count=5 and -count=50.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt saves

applyUpdate (database.go) read existing.Meta().IsDeleted() without holding
the notification lock, while delete() writes Meta().Deleted under the lock:
a data race between a user response arriving via the database interface and
the expiry cleaner, an action function or any other Delete().

Worse, save() and delete() both updated the global nots map only after
releasing the notification lock, and save() did not check the deleted flag.
With a response applied concurrently with a deletion, the pending save of
the response ran after the delete and re-inserted the already deleted
notification into the map. Such a zombie is never removed again (the
cleaner's delete() returns early for deleted notifications), it is still
returned by notifications.Get() and by the storage Get(), and callers that
use Get() != nil as "already shown" (compat, broadcasts) suppress new
notifications with that event ID until restart.

Fix: check the deleted flag under the lock in applyUpdate, never re-add a
deleted notification in save(), and update the map while holding the
notification lock (lock order n.lock -> notsLock; notsLock is never held
while acquiring a notification lock).

Proof: TestApplyUpdateConcurrentDelete (applyUpdate racing delete).
Before: "WARNING: DATA RACE" write at record.(*Meta).Delete()
(notification.go:451) vs. previous read at (*Meta).IsDeleted() via
applyUpdate (database.go:148); and, even without -race, -count=10 reported
"1..3 deleted notifications were re-added to the notification storage"
(19-31 per run with -race). After: passes -race -count=10, -count=30.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
upgradeMoveFiles sets u.index to the new index as soon as all files are
moved. If the following post-upgrade command fails (FailOnError), upgrade()
rolls the files back via recoverFromFailedUpgrade, which moves the purged
old files, including the old index file, back into the main directory -
but u.index kept pointing to the new index.

Afterwards the in-memory state contradicts the installed files: GetFile /
GetFiles / GetIndex report the new version and SHA256 sums for files that
contain the old version, and every later update check compares the new
index with itself (same Published date -> ErrSameIndex) and reports "no
new update", so the failed upgrade is never retried until a restart
reloads the old index from disk.

Fix: remember the index before moving files and restore it when the
upgrade fails, before the rollback.

Proof: TestFailedPostUpgradeCommandRestoresIndex (post-upgrade command
"false" with FailOnError). Before: "active index is v1.0.1, but installed
files were rolled back to v1.0.0". After: passes with -race -count=3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion lock

handleConnection held the lock of the connection while it converted the
connection, wrote it to SQLite (waiting for the database write lock, which
bandwidth updates, the cleaner and history maintenance also take) and
pushed the update. The packet path of that connection (verdict handling,
bandwidth updates, re-evaluation) had to wait for the disk write.

Only take the lock to snapshot the connection: convert it and copy the
metadata and the history flag. The model no longer references the
connection: Allowed pointed at conn.ConnectionEstablished and is now a
copy. Updates of a connection stay in order, as the feed is handled by a
single worker.

TestHandleConnectionSavesUnlocked (store that blocks in Save) failed
before with "connection is locked while it is saved to the store" and
also checks that the saved model does not change with the connection.

Lock hold time per connection update (i7-14700HX, -count=5 medians):
  before: all of BenchmarkHandleConnection
          history=false 44.7 us, history=true 82.3 us
  after:  BenchmarkSnapshotConnection 5.4 us
The total cost of handleConnection is unchanged (44.9 us / 83.4 us).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… updates

Database.Save upserts a connection with ON CONFLICT(id) DO UPDATE SET
<every column>. SQLite decides by the columns of the SET list which
indexes an UPDATE has to rewrite, not by whether the values change. Every
update of a connection (typically two or more per connection, in the live
and in the history database) therefore rewrote the primary key index and
the started index, although neither value can change: the ID is the
conflict target and network.Connection.Started is only set when the
connection is created.

Only write these two columns on insert. The partial (started, ended)
index is still maintained, as ended changes.

TestSaveStoresSameRowsAsFullUpdate saves a series of inserts and updates
that change every other column, plus bandwidth updates, with the new and
with the previous statement and compares all columns of all rows of the
live and the history database.

BenchmarkHandleConnection (i7-14700HX, -count=5 medians, every connection
is saved three times):
  history=false  44.9 us -> 37.5 us  (-16%)
  history=true   83.4 us -> 64.9 us  (-22%)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
After saving a connection, the manager marshals it to JSON and wraps it in
a record to push it to the subscribers of runtime:netquery/conns/. The UI
reads connections with SQL queries and does not subscribe to them, so the
record was created for every connection update and then dropped by
Controller.PushUpdate (about a quarter of the CPU time of
handleConnection).

Add Controller.HasSubscribers(dbKey) and Registry.HasSubscribers(key),
which report whether a subscription matches the key (ignoring permissions
and query conditions, so they never report too few), and skip creating
the record if there is none. A push only notifies the subscriptions that
exist at that moment, so subscribers receive the same updates as before.

TestPushConnUpdate checks that a subscriber of the connections still
receives the same JSON and that other subscriptions do not count;
TestControllerHasSubscribers covers the key matching.

BenchmarkHandleConnection without subscribers (i7-14700HX, -count=5
medians):
  history=false  37.5 us 7409 B 53 allocs -> 30.3 us 5514 B 44 allocs (-19%)
  history=true   64.9 us 7442 B 54 allocs -> 57.9 us 5547 B 45 allocs (-11%)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… the packet

The first try of a process lookup used the current socket tables only if
the packet was seen after they were last updated, and fetched the tables
from the system otherwise. That is the wrong way round for the second
case: tables that were fetched after the packet was seen (by the lookup
of another packet, while this one was waiting) are as good for this
packet as newly fetched ones. Every packet of a burst of new connections
that was seen before the first of them refreshed the tables fetched them
again, and each fetch waits for the pause between table updates (10 ms)
and reads the tables from the system (2.2 ms for 50 TCP4 sockets here,
BenchmarkTableFetch), while the packet is held.

Always use the current tables for the first try. Nothing changes for
packets seen after the last update, and a miss still fetches on the next
try. The comment on lookupTries now documents the semantics, including
that the first try trusts tables of any age (unchanged).

TestLookupFirstTryUsesTablesNewerThanPacket failed before for TCP and
UDP with "table was fetched 1 times, although it holds the socket and is
newer than the packet", taking 10 ms per lookup.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Since the factory is held in an atomic pointer, SetLocalAddrFactory(nil)
stored a pointer to a nil function. It was correctly not called, but it
counted as set, so a later call with a real factory was ignored. Before
the atomic pointer, setting nil left the factory unset. Restore that.

TestSetLocalAddrFactoryOnce failed before with "local address is <nil>,
expected the one of the first factory".

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
flushWriteCache writes the whole write cache with one Interface.PutMany
batch and then cleared the write cache unconditionally. Since 3bff1b5 a
batch that times out on a storage.AbortableBatcher (sqlite, bbolt) is
discarded as a whole and its result wraps storage.ErrBatchAborted, so one
aborted flush lost every delayed write that was in the write cache. A
timeout is possible whenever the flushing goroutine stalls for over a
second between two puts (e.g. system suspend, CPU starvation).

The write cache is now kept when a put or the finishing put(nil) reports
storage.ErrBatchAborted or errPutManyTimeout, and the next regular flush
trigger (threshold ticker, eviction trigger, force ticker) retries all of
its records. errPutManyTimeout is included because an abortable storage
reports a batch that timed out before any record was forwarded only as
errPutManyTimeout, and a storage without abort support stores just the
records submitted before the timeout; writing a record again is
idempotent. Other errors (storage write errors, read-only, permission,
shutdown) keep the previous behavior of logging and clearing, as they may
be caused by the records themselves and would block every later flush.

flushWriteCache holds writeCacheLock throughout, so neither
cacheEvictHandler nor updateCache can interleave; kept records are later
replaced by newer versions of the same key or written by the evict
handler, as for any pending record.

On shutdown, DelayedCacheWriter flushes once more, so that an aborted
final flush is retried once instead of losing the kept records at exit.
The second call is a no-op if the write cache is already empty.

Tests: TestFlushWriteCacheKeepsAbortedRecords failed before with "0
records are left in the write cache after the aborted flush, expected
50"; TestDelayedCacheWriterRetriesAbortedFlushOnShutdown failed with "0
records are stored after shutdown, expected 20" (and, with only the
flush fix, "20 records are left in the write cache after shutdown").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The process/list/by-profile and process/group-leader endpoints returned
the live *Process values from their StructFunc. The API layer encodes
the returned value (dsd.MimeDump) after the handler returned, without
holding the process lock, while exported, serialized fields of the
same, already stored processes are written under Process.Lock():

- LastSeen by CleanProcessStorage (SetLastSeen)
- PrimaryProfileID by RefetchProfile/GetProfile (setProfile)

The encoder therefore raced with these writers; a torn read of the
PrimaryProfileID string header can read invalid memory.

Return snapshots instead: snapshotForAPI copies the serialized fields
into a new Process while holding only that process's lock (no other
lock is taken while holding it, and Leader() is resolved before, so
no new lock ordering is introduced). Maps and slices are cloned so the
snapshot is independent of the live process. The copy is built field
by field, so no lock is copied (go vet copylocks stays clean).

record.Base and sync.Mutex have no exported fields, so the encoded
output is unchanged; TestProcessAPIOutputUnchanged compares the JSON,
YAML, CBOR and msgpack output of the live process against the handler
output and fails if a serialized field is left out of the snapshot.

Evidence (TestHandleGetProcessesByProfileRace, go test -race, before
the fix):

  WARNING: DATA RACE
  Read at 0x00c0002402a8 by goroutine 37:
    encoding/json.stringEncoder()
    dsd.MimeDump()
    process.TestHandleGetProcessesByProfileRace()  api_race_test.go
  Previous write at 0x00c0002402a8 by goroutine 38:
    process.(*Process).setProfile()  service/process/profile.go:64
  ...
  Previous write at 0x00c000164d50 by goroutine 38:
    process.(*Process).SetLastSeen()  service/process/process.go:197

After the fix the test is clean with -race -count=10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When ExpandTo failed to start the relay operation on the previous hop,
the relay operation was stopped, which abandoned the half-built
expansion terminal. But the terminal's workers were only started after
the relay operation was started successfully, so the abandon procedure
blocked in TerminalBase.Flush on the unbuffered flush channel that only
the never-started Sender reads, until the 5 minute flush timeout. During
that time the terminal context was not canceled and the stop message
unit stayed queued in the flow queue without being finished.

Start the expansion terminal's workers before starting the relay
operation, so that the abandon procedure completes immediately. Nothing
is sent through the terminal before the relay operation is started.

Also, establishRoute (spn/crew) did not abandon expansions that it had
created but not taken into use when a later step failed (failed or
timed-out authentication of this or a later hop, failure to expand to a
later hop). These terminals were not referenced anywhere and lingered,
together with the relay chain on the hubs, until their idle timeout.
Abandon them when building the route fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CapacityTestOp.HandleStop only reported the result and drained the
receive queue, but the handler worker did not notice that the operation
had stopped. When the remote side stopped the operation or the terminal
was abandoned, the handler kept running until the maximum test time or
the 30 second operation timeout. Meanwhile it held the global
capacityTestRunning lock, so new capacity tests were rejected with
"another capacity op is already running", and on reaching the maximum
test time it still reported the partial measurement as the lane
capacity.

Close a stopping channel in HandleStop and let the handler return when
it is closed. The sender already ends after its next send, as it checks
Stopped().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The global unit scheduler was replaced with a plain assignment on every
start of the terminal module, while messages may be created concurrently
(eg. by goroutines still running from the previous run), which is a data
race on the scheduler variable and on the newly created scheduler. The
metrics also bound the scheduler's getters at their first (and only)
registration, so after a restart they kept reporting the stopped
scheduler.

Hold the scheduler in an atomic.Pointer, publish a new scheduler only
after it is set up and read it via getScheduler() everywhere, including
in the metric functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
delete() removed nots[EventID] without checking that the entry is the
notification being deleted. If a notification was replaced by a newer one
with the same EventID, deleting the old copy (expiry cleaner or a late
Delete()) removed the newer one from the map, making it unreachable while
still shown. Only delete the map entry if it is the same object.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
delete() dereferenced n.Meta(), which is nil until the first save, so
Delete() on a never-saved notification panicked. For such notifications
only release the expiry channel and connected state and return; behaviour
for saved notifications is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`defer msg.Finish()` evaluates the receiver when the defer statement runs.
In the terminal sender, the crew connect writer, the capacity test
handler and the crane loader the variable is nil at that point and only
assigned later in the loop, so the deferred call always ran on nil (a
no-op). A message that was still held when the worker exited (buffered in
the sender, received but not yet finished in the writer/handler/loader)
never had its scheduling unit finished, so the scheduler kept counting it.

Wrap the calls in closures so the variable is read at exit. Msg.Finish
and Unit.Finish are nil-safe and idempotent, so double finishing is
harmless. The terminal handler defer is changed the same way for
consistency (handleReceive already finishes its msg).

Regression test: TestSenderFinishesBufferedUnit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The DuplexFlowQueue encodes reported receive space as a varint of the full
value, while the receiving side parses it with GetNextN16 (max 65535).
Queue sizes of up to MaxQueueSize (1,000,000) are allowed, so a report
(queue size minus already reported space) could exceed 65535 and the peer
failed to parse the flow control message as malformed data.

Cap each report at math.MaxUint16 in reportableRecvSpace. Only the capped
amount is added to reportedSpace, so the remainder stays accounted and is
reported with the next report; a forced report is triggered when capped so
it is sent even if no further data flows. The wire format is unchanged.

Regression test: TestFlowQueueSpaceReportLimit (fails before with
"reported space 200000 does not fit into 16 bits").

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The global rngFeeder was reassigned with a plain assignment on every start
of the terminal module while terminals may concurrently read it in
handlePaddingMsg, which is a data race (reproduced with -race).

Hold the feeder in an atomic.Pointer and read it via getRngFeeder(), like
the unit scheduler next to it.

Regression test: TestRngFeederRestart (reports a DATA RACE before).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When an auth operation was stopped without an error, its result is a nil
*terminal.Error, which is neither an error nor ErrExplicitAck and thus
ends up in the "aborted" branch of establishRoute. The branch intended to
replace a missing error with ErrUnknownError, but the condition was
inverted (`tErr != nil`): a nil error stayed nil, so
`tErr.Wrap(...)` (nil-safe, returns nil) was returned through the `error`
return value as a non-nil interface holding a nil pointer. That error has
no message ("<nil>") and panics on Error(). Non-nil results (eg. a
stopping status) were replaced by an unknown error, losing the reason.

Move the check into abortedAuthError and replace only a nil error.

Regression test: TestAbortedAuthError (fails before with "aborted error
for <nil> is nil").

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two defects left the update directory in a mixed state after a failed
upgrade was rolled back:

- recoverFromFailedUpgrade only moves the purged old files back. Files
  that exist only in the new version and were already moved into the
  directory have no purged counterpart, so they stayed behind next to the
  old version.
- copyAndCheckSHA256Sum (the copy fallback of moveFile) writes
  "<dst>.copy" and renames it into place. If the rename fails, the
  temporary file was never removed, and nothing cleans the main
  directory of .copy files.

Fix: upgradeMoveFiles now returns the names of the new files it actually
installed (index file and artifacts, also on failure). The rollback
removes exactly those with os.Remove (never RemoveAll) unless the name
had a purged old counterpart (restored over it) or is listed in
Config.Ignore. Removal failures (e.g. files in use on Windows) are only
logged, as for the existing restore step. copyAndCheckSHA256Sum now
removes its temporary file when writing or renaming fails.

Proof: TestRollbackRemovesNewOnlyFiles (missing last artifact) failed
with 'unexpected leftover "aaa-new-only"'; TestRollbackLeavesNoCopyFiles
(non-empty directory in the way) failed with 'unexpected leftover
"portmaster.copy"'. Both pass now with -race.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mergeStringList built a map to deduplicate and then sorted the keys. It runs
for every domain, CNAME, ASN, country and IP that is in a filter list. The
lists are a few names, so copy both into one slice, sort it and compact it.
The result is unchanged: sorted, distinct, never nil, always a new slice.

TestMergeStringListMatchesMap compares 50k random inputs (nil, empty,
duplicates, within and across both slices) with the previous implementation.

i7-14700HX, one CPU, -count=10, medians, per iteration of
mergeStringList(nil, y) + mergeStringList(x, y) with n names each:
  n=0    58 ns    0 B 0 allocs ->   41 ns    0 B 0 allocs (-29%)
  n=1   347 ns   48 B 2 allocs ->  164 ns   48 B 2 allocs (-53%)
  n=3  1089 ns  112 B 2 allocs ->  461 ns  144 B 2 allocs (-58%)
  n=10 4120 ns 1232 B 8 allocs -> 1850 ns  480 B 2 allocs (-55%)
The firewall DecideOnConnection benchmarks (also with lists) are unchanged
within noise, as only a listed entity gets here, once per list key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…er snapshot

The wrapped config options of a layered profile (UseSPN, KeepHistory,
EnableHistory, UseSplitTun, ...) read lp.RevisionCounter and lp.layers
while holding only their own refresh lock. Update and
increaseRevisionCounter write both under the write lock of the layered
profile, and several callers use the options without any lock on the
layered profile: checkTunneling (firewall/tunnel.go), the split tunnel
check (firewall/split-tunnel.go), the history cleaner
(netquery/database.go) and Connection.Save (network/connection.go).
That is a data race on the revision counter and on the layers slice,
which Update changes in place.

Taking the read lock in the options is not an option: MatchFilterLists
and other callers use them while the layered profile is locked for
usage, and a second RLock deadlocks as soon as Update waits for the
write lock in between.

Publish an immutable snapshot of the revision counter and a copy of the
layers in an atomic pointer instead. It is replaced whenever the
revision counter changes, which always happens under the write lock, so
callers that hold a lock see exactly what they saw before. The options
only load the snapshot and take no lock on the layered profile. The
config perspective of a layer is written once before the layer is
shared.

TestLayeredProfileOptionsWithoutLock produced 25 race reports before
and none now. TestLayeredProfileOptionsDoNotLock shows that an option
returns while a read lock is held and an update is waiting.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e bandwidth map

The eBPF bandwidth map holds absolute byte counters per 5-tuple, and the
reporter passed them on as absolute values. Two things went wrong:

- The counters outlive the connections of Portmaster. The entry of a UDP
  socket keeps counting after its connection ended, so the successor
  connection with the same 5-tuple started at zero and was credited with
  all bytes of its predecessors by its first update.
- To skip unchanged entries, the reporter set Reported=1 by writing the
  whole entry back. That replaced rx and tx with the values read during
  the iteration and dropped whatever the kernel side had added in
  between (the UDP programs add to the entry atomically).

Keep the reported counter values per map key in the reporter and send
only what was added since as additive updates. The map is only read
now. Unchanged entries are skipped by comparing with the remembered
values, a counter that went backwards is treated as reset (as the
consumer of absolute updates did), and the remembered values are only
advanced once the update is queued, so a full queue delays bytes
instead of dropping them. Remembered entries are dropped when they are
gone from the map. As iterating a changing map may miss entries, every
unseen entry is looked up first: forgetting a live entry would report
all of its bytes again.

The eBPF programs and generated objects are unchanged. The Reported
field is simply not used anymore by the Go side.

The reporter logic is covered by tests against a fake map source. The
access to the real map (Iterate and Lookup) needs root and is not
covered.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Process.GetExecHash had no callers (repo-wide grep, Go and UI) and three
defects waiting for the first one: it wrote Process.ExecHashes without
the process lock (the API export clones that map under the lock), it
wrote to the map without ever allocating it (ExecHashes is never
initialised anywhere, so the first call would panic with "assignment to
entry in nil map"), and an unknown algorithm left the hasher nil and
panicked in io.Copy.

Remove the method instead of fixing code nobody runs. The ExecHashes
field stays, as it is part of the exported process record.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…aits

A TCP query hands itself to the connection handler through the buffered
queries channel and only then starts waiting on its unbuffered Response
channel. The handler delivered replies with a non-blocking send and
treated a failed send as "the query gave up". When the query goroutine
was not yet parked on its receive (e.g. preempted right after the
buffered send, which is common under CPU load), the server's reply was
silently dropped (or only cached) and the query timed out after
defaultRequestTimeout (3s) although the server had answered. This hits
any TCP/DoT query in production, most often when many queries are sent
at once, e.g. after a reconnect.

Give the Response channel room for the one reply, so delivering never
blocks and never drops it. To keep caching replies that arrive after the
query gave up, the query and the handler settle the query with a
compare-and-swap: the handler delivers only if the query still waits,
and a query that gives up uses a reply that was delivered meanwhile.

Evidence: TestTCPResolverConcurrentReconnectDialsOnce failed with
"query timed out", every failing run taking exactly 3.00s. Stress with
56 parallel processes of the race-built package test binary, each
GOMAXPROCS=2 -test.run TestTCPResolver -test.count=20 -test.short:
before 58 failures in 1120 runs, after 0 in 2240 runs.
The new TestTCPResolverConnReplyBeforeQueryWaits fails deterministically
with the previous delivery semantics and passes now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…missing

When reading the main directory failed with ErrNotExist, upgradeMoveFiles
called utils.EnsureDirectory on the purge directory (which it had just
created) although the error text says "create current directory". The main
directory therefore stayed missing and moving the new index file into it
failed, so the upgrade was rolled back.

Impact: New() creates the main directory, so this only hits when the main
directory disappears between startup and the upgrade (e.g. a user deletes
the intel directory while Portmaster runs). Every following upgrade then
failed until a restart, instead of re-creating the directory.

Evidence: TestUpgradeCreatesMissingMainDirectory (New, remove main dir,
upgrade) failed before with:
  upgrade failed, but recovery was successful: failed to move index file
  to .../installed/index.json: move failed, copy+delete fallback failed:
  write temp dst file: open .../installed/index.json.copy: no such file
  or directory
It passes now with -race.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moveFile falls back to copyAndCheckSHA256Sum when os.Rename fails (e.g.
EXDEV: on Linux the binary purge and download directories live in
/var/lib/portmaster while the main directory is /usr/lib/portmaster, which
can be different file systems). The log line says "copy+delete", but the
source was never deleted, so a "move" became a copy:

- upgradeMoveFiles: the old version's files were copied to the purge
  directory but stayed in the main directory. Files the new version no
  longer ships stayed there as stale, unindexed files (picked up by the
  directory scan fallback in New and kept forever).
- recoverFromFailedUpgrade: restored files also stayed in the purge dir.
- downloads stayed in the download dir (harmless, cleanupAfterUpgrade
  removes it).

Fix: after a successful (and, for artifacts, SHA256-verified) copy, remove
the source. A source that cannot be deleted (e.g. a file in use on
Windows) is only logged and left behind as before, so that this cannot
turn an upgrade that succeeded so far into one that always fails
(changed by the integrator on review). Directories are
unchanged: os.ReadFile on a directory fails, so the fallback still errors
out before deleting anything and the upgrade is rolled back (checked with
a probe test: main directory restored exactly, purge directory empty).

To test without a second file system, moveFile calls a package-level
renameFile (= os.Rename), which the tests replace.

Evidence: before the fix
  TestUpgradeCopyFallbackRemovesSource:
    unexpected file "zzz-old-only" in main directory after upgrade
    unexpected file "aaa-new-only" left in download directory (and others)
  TestRollbackWithCopyFallback:
    unexpected file "assets.zip" left in purge directory after rollback
    (and the other restored files)
Both pass now with -race.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Config.Ignore names entries in the main directory that the upgrade leaves
in place (they are not moved to the purge directory). If the new version
has an artifact (or index file) of the same name, moveFile overwrote the
ignored file. It was never purged, so a rollback could not restore it, and
recoverFromFailedUpgrade also skips ignored names when removing new files:
after a failed upgrade the new content stayed in place and the original
file was lost.

Fix: an ignored regular file whose name the new version installs is moved
to the purge directory like any other old file, so a rollback restores it.
Ignored files that the new version does not replace, and ignored
directories, are left alone as before.

Why back up instead of skipping the artifact: the real configurations only
ignore "uninstall.exe" in the Windows binary directory (Linux binaries and
intel ignore nothing), and no release ships an artifact of that name, so
their successful upgrades are unchanged either way. Skipping would leave
the installed index listing an artifact whose file on disk does not match,
which VerifyArtifacts reports as a corrupted installation (and for intel
triggers a repair that could never succeed). Backing up keeps today's
successful-upgrade result (the artifact is installed) and makes the
rollback lossless. Directories are excluded because a purged directory
cannot be renamed back over the installed file during rollback; for them
the install still fails and is rolled back untouched (see
TestRollbackLeavesNoCopyFiles).

Evidence: TestRollbackRestoresIgnoredFileReplacedByArtifact (ignored
"portmaster" with custom content, upgrade fails after installing it)
failed before with:
  rollback_test.go:161: "portmaster" changed by rollback
It passes now with -race. TestUpgradeIgnoredFiles pins the successful
upgrade: the artifact replaces the ignored file, an unrelated ignored file
stays unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the eBPF reporter sends additive deltas instead of absolute
counters (b560240), an update for which no connection is found is lost
for good: updateBandwidth dropped it, and unlike an absolute value the
next update does not include those bytes. This happens when the kernel
counts bytes of a flow slightly before Portmaster registered the
connection, or between cleanup and re-creation of a connection. The
Windows kext integrations (v1 and v2) also send additive updates and
had the same loss.

Additive updates without a connection are now held per connection ID
in a small map owned by the single bandwidth update handler goroutine
(no lock needed) and added to the next additive update of that ID that
finds its connection. The merged update goes through
applyBandwidthUpdate as before, so when the connection is locked, the
held bytes are deferred on the connection together with the update and
credited once. Absolute updates are unchanged.

Bounds:
- TTL 10s from the first held update of an entry: ten collect intervals
  of the 1s reporters, far more than the delay of registering a
  connection on its first packet, and short enough that bytes of a
  predecessor with the same 5-tuple are dropped instead of being
  credited to a successor (the bug fixed by b560240). Further updates
  do not extend the lifetime of an entry, so at most 10s worth of bytes
  is ever carried.
- At most 4096 entries (well below 1 MiB). When full, expired entries
  are removed first, otherwise the new update is dropped as before
  rather than evicting valid entries.
- Expired entries are swept at most once per second, driven by the
  passed-in time, so the map does not hold expired entries for flows
  Portmaster never tracks for longer than TTL plus 1s.
Byte sums saturate instead of wrapping.

Evidence: new tests in bandwidth_pending_test.go cover credited once
within TTL, dropped after TTL, accumulation and saturation, the entry
limit, absolute updates and the locked connection path. With the base
behaviour (drop when not found) the credited, accumulation, limit and
locked tests fail, e.g. "applied 5/1 bytes, want 105/11". The real
reporter cannot be driven from service/firewall, as its types are
unexported in its package, which cannot import service/firewall without
an import cycle. The tests use connection IDs created like the reporters
do instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What: TestConnectOp (only run without -short) always failed with "failed to
read request: EOF" after ~60ms, before any network access. The exit side of
the connect op (ConnectOp.handleSetup) requires a terminal implementing
terminal.SessionTerminal for rate limiting and otherwise stops the op with
"no session available" (reported to the client as "[ext] internal error").
terminal.TestTerminal has no session, so the op was always stopped and the
client side closed the app connection. The test now attaches a test terminal
extension with a terminal.SessionAddOn to the exit side terminal.

The test still needs -short to be skipped: the connect op only dials IPs in
the global scope (netutils.GetIPScope check in ConnectOp.setup, independent
of the exit policy), so a loopback/LAN listener is always denied and the test
cannot be made hermetic without a production change. The skip message and a
comment now say so.

Impact: test-only. No production code changed. This was not a bug in the
connect op: the real exit side always runs on a CraneTerminal, which has a
session.

Evidence: before: FAIL (EOF, connection marked failed with "the exit node
reported an error: [ext] internal error"). After: PASS (HTTP 301 from
orf.at), go test -race -count=50 -run TestConnectOp ./spn/crew/: 50/50 PASS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0n113 and others added 25 commits November 20, 2026 01:47
perf(database/sqlite): write records without a RETURNING clause
The smoke test now waits until the filter lists are downloaded and
loaded, then checks that a tracker on the default lists is blocked and
that the block names the lists. This covers the intel updater, the list
decoder and the SQLite cache database, which the other checks do not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(vmtest): check filter list blocking in the Linux smoke test
The process module looked up the path of the UI binary once at start
and logged an error if it was missing. Installations without the UI
(servers, headless setups) showed this error in every debug info, and
when the updater installed the UI after start, the UI was not
recognized as such until a restart.

The path is now looked up when it is needed, again every 10 seconds
while the UI is missing, and compared by its real path. A missing UI
is logged at info level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the UI path no longer logged as an error, a normal run logs no
errors, so any ERR or CRT line now points to a problem and fails the
test, with the first lines shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(process): look up the UI path lazily and do not log it as an error
…mmand

`portmaster-core update` installed the new binaries and then failed with
"binary update failed: action required: restart required" and exit code
1, and the updater logged the same as a worker error. Scripts calling
the command saw a failure after a successful update.

The restart-required result now has its own error, ErrRestartRequired,
which ForceUpdate (used only by tools) logs at info level and treats as
success. The service still notifies the user to restart.

The Windows smoke test now checks the exit code of the update command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(updates): report an installed upgrade as success in the update command
Upstream safing#1981 reports blocked connections that only
fail after a 25-30 second timeout. The smoke tests now time a connection
blocked by a rule and fail if it takes 5 seconds or more. Windows: 0.1 s,
Linux: 1.0 s, both with curl exit code 7 (connection refused).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(vmtest): check that blocked connections fail at once
…ws code in CI

Semver-compatible updates: anyhow 1.0.104 (unsound downcast_mut),
webpki-roots 0.26.11 / 1.0.12 (distrusted emSign intermediates),
plist 1.10 and notify-rust 4.17 (quick-xml >= 0.41). The direct
tauri-winrt-notification dependency goes from 0.3 to 0.8, the last user
of quick-xml 0.31; its activation callback now returns the Result type
of the windows crate it is built with, so the closure leaves it to
inference. cargo audit: 13 -> 8 vulnerabilities; the rest are in
optional dependencies that are not compiled (rustls 0.22 of
tokio-websockets, rkyv of rust_decimal).

The Windows-only code of the UI was only compiled for releases. A new CI
job runs clippy for x86_64-pc-windows-gnu, the target of the installer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new Windows clippy job found them. One is a bug: starting the
service when it is not installed ran sc.exe anyway, because
open_service() reports a missing service as Ok(false), not as an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The status came from `systemctl is-active`. That prints "inactive"
for units that do not exist, so a missing service was shown as stopped
with a "Start Now" button, and the "please reinstall" message was never
shown. A failed service ("failed") was not handled and ended in an
error instead of the start button.

`systemctl show -p LoadState -p ActiveState` answers both in one call
and exits with 0 for missing units: LoadState=not-found is not
installed, ActiveState active/reloading/refreshing is running, any other
state is stopped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(tauri): update dependencies with security advisories, check Windows code in CI
Most systems have systemctl in only one of the four checked paths, so
every UI start logged errors for the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(tauri): report a missing or failed system service correctly on Linux
Until the first intel download (first start, offline), the core logged
three warnings per connection: filter lists not loaded, no geoip
update and no location data. A 30 minute soak test without intel data
had about 3,500 of them and no other warning. The filter list module
already sets a state the UI shows, and the update module reports the
missing data.

These cases are now debug messages; other geoip errors stay warnings.
geoip.ErrDatabaseNotAvailable is exported to tell them apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(intel): do not warn on every connection while intel data is missing
…ew socket

DNS lookups through Portmaster failed now and then with a 3 second
timeout (about 3% of uncached lookups in the Linux VM, 0% without
Portmaster). The upstream query of the Portmaster resolver was sent
back to the Portmaster nameserver itself:

1. systemd-resolved queries 10.0.2.3:53 from some port. Portmaster
   redirects it to its nameserver and keeps the connection, with the
   verdict "reroute to nameserver", for 10 minutes after it ended.
2. The OS gives the same port to a new socket of the Portmaster
   resolver for a query to the same server. Its packets have the same
   address tuple, so they matched the old connection and got its verdict
   without being looked at, and its conntrack entry still held the DNAT.

Ended connections now no longer take packets: the packet dispatcher
removes such a connection from the state (it stays in the history) and
handles the packet as a new connection, which also fixes the process
attribution for any program that reuses a tuple. Before the Portmaster
resolver sends the first packet of a new UDP socket, it also ends a
connection with that tuple that is not marked as ended yet (the old
socket is gone, as the OS handed out its port) and deletes its conntrack
entry on Linux.

The plain resolver now also resends a UDP query after 1 second without
reply, within the same timeout, as stub resolvers do (RFC 1035 4.2.1).
That was not the cause here, but a single lost packet failed the query
before.

Linux VM, 600 uncached lookups in bursts of 10: 21-29 slower than 2 s
and as many resolver timeouts before, 0 and 0 after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Until the filter list index is downloaded (first start, offline), the
global profile cannot resolve the filter list IDs. It then showed the
warning "Internal Settings Failure" in the UI and retried every 15
seconds, each retry logged as a failed worker (ERR), until the lists
were there: on a fresh VM 35 seconds, which made the Linux smoke test
fail now and then.

A missing index is now retried quietly. Only one retry is pending at a
time; before, every config change during a failure added another retry
chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(profile): do not report missing intel data as a settings failure
apt hung for over 30 minutes on a PR run. The step now gives up after
10 minutes and apt retries and times out requests itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(firewall): do not apply the verdict of an ended connection to a new socket
ci: time out the MinGW install step of the Windows clippy job
On the first start the filter list index is not downloaded yet. App
profiles with their own filter lists then logged a warning and fell back
to the global filter lists until the profile was reloaded for another
reason, e.g. a settings change or a core restart.

Profiles now remember that their filter lists are pending. Once the
global config profile resolves its filter lists, which it retries until
the index is there, all active profiles with pending lists are marked as
outdated and reloaded on their next use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0n113

0n113 commented Nov 20, 2026

Copy link
Copy Markdown
Author

Opened here by mistake, this belongs to a fork. Sorry for the noise.

@0n113 0n113 closed this Nov 20, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 652 files, which is 352 over the limit of 300.

To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch.

Usage-priced reviews support at most 500 files.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2451af46-c1b9-4e50-8cfb-913a29b6b604
Commits

Reviewing files that changed from the base of the PR and between e9ca8c4 and d5e8c38.

Files ignored due to path filters: 8

  • assets/data/img/spn-feature-carousel/access-regional-content-easily.png is excluded by !**/*.png
  • assets/data/img/spn-feature-carousel/built-from-the-ground-up.png is excluded by !**/*.png
  • assets/data/img/spn-feature-carousel/bye-bye-vpns.png is excluded by !**/*.png
  • assets/data/img/spn-feature-carousel/easily-control-your-privacy.png is excluded by !**/*.png
  • assets/data/img/spn-feature-carousel/multiple-identities-for-each-app.png is excluded by !**/*.png
  • assets/data/img/spn-login.png is excluded by !**/*.png
  • desktop/tauri/src-tauri/Cargo.lock is excluded by !**/*.lock
  • go.sum is excluded by !**/*.sum
Files selected for processing: 652

  • .github/workflows/angular.yml
  • .github/workflows/go.yml
  • .github/workflows/kext.yml
  • .github/workflows/no-telemetry-ci.yml
  • .github/workflows/release-windows-installer.yml
  • .github/workflows/release.yml
  • .github/workflows/tauri.yml
  • .github/workflows/upstream-sync.yml
  • .github/workflows/windows-dll.yml
  • .gitignore
  • .golangci.yml
  • BUILDING.md
  • CHANGELOG.md
  • Earthfile
  • README.md
  • RELEASE.md
  • base/api/authentication.go
  • base/api/authentication_test.go
  • base/api/database.go
  • base/api/database_test.go
  • base/api/endpoints.go
  • base/api/endpoints_debug.go
  • base/api/endpoints_debug_test.go
  • base/api/endpoints_test.go
  • base/api/init_test.go
  • base/api/router.go
  • base/api/router_test.go
  • base/apprise/notify.go
  • base/apprise/notify_test.go
  • base/config/flatten_test.go
  • base/config/get-safe.go
  • base/config/get.go
  • base/config/persistence.go
  • base/config/persistence_concurrency_test.go
  • base/config/persistence_write_linux_test.go
  • base/config/unknown_keys_test.go
  • base/config/validate.go
  • base/config/validate_test.go
  • base/database/accessor/accessor_test.go
  • base/database/controller.go
  • base/database/controller_subscribers_test.go
  • base/database/interface.go
  • base/database/interface_cache.go
  • base/database/interface_cache_abort_test.go
  • base/database/interface_delete_test.go
  • base/database/interface_flush_test.go
  • base/database/interface_putmany_abort_test.go
  • base/database/interface_putmany_test.go
  • base/database/storage/badger/badger_test.go
  • base/database/storage/bbolt/bbolt.go
  • base/database/storage/bbolt/bbolt_test.go
  • base/database/storage/bbolt/maintenance_test.go
  • base/database/storage/bbolt/open_linux_test.go
  • base/database/storage/bbolt/purge_test.go
  • base/database/storage/bbolt/putmany_abort_test.go
  • base/database/storage/bbolt/putmany_test.go
  • base/database/storage/bbolt/query_test.go
  • base/database/storage/errors.go
  • base/database/storage/hashmap/map.go
  • base/database/storage/hashmap/map_test.go
  • base/database/storage/hashmap/query_test.go
  • base/database/storage/interface.go
  • base/database/storage/sqlite/prepared.go
  • base/database/storage/sqlite/prepared_test.go
  • base/database/storage/sqlite/putmany_abort_test.go
  • base/database/storage/sqlite/putmany_test.go
  • base/database/storage/sqlite/sqlite.go
  • base/database/storage/sqlite/sqlite_test.go
  • base/info/version.go
  • base/log/output.go
  • base/log/trace.go
  • base/log/trace_test.go
  • base/log/writer.go
  • base/log/writer_panic_test.go
  • base/log/writer_perm_test.go
  • base/log/writer_test.go
  • base/metrics/api.go
  • base/metrics/api_test.go
  • base/metrics/metrics_runtime.go
  • base/metrics/metrics_runtime_test.go
  • base/notifications/database.go
  • base/notifications/delete_test.go
  • base/notifications/delete_unsaved_test.go
  • base/notifications/notification.go
  • base/notifications/notification_test.go
  • base/rng/rng_test.go
  • base/runtime/registry.go
  • base/runtime/registry_test.go
  • base/utils/call_limiter.go
  • base/utils/call_limiter2.go
  • base/utils/call_limiter_clock_test.go
  • base/utils/call_limiter_test.go
  • base/utils/onceagain_test.go
  • base/utils/renameio/writefile.go
  • base/utils/renameio/writefile_test.go
  • cmds/portmaster-core/main.go
  • cmds/testsuite/login.go
  • desktop/CHANGES.md
  • desktop/angular/projects/safing/portmaster-api/src/lib/config.types.ts
  • desktop/angular/projects/safing/portmaster-api/src/lib/features.ts
  • desktop/angular/projects/safing/portmaster-api/src/lib/module.ts
  • desktop/angular/projects/safing/portmaster-api/src/lib/portapi.service.ts
  • desktop/angular/projects/safing/portmaster-api/src/lib/spn.service.ts
  • desktop/angular/projects/safing/portmaster-api/src/lib/spn.types.ts
  • desktop/angular/projects/safing/portmaster-api/src/public-api.ts
  • desktop/angular/src/app/app-routing.module.ts
  • desktop/angular/src/app/app.module.ts
  • desktop/angular/src/app/integration/browser.ts
  • desktop/angular/src/app/integration/electron.ts
  • desktop/angular/src/app/layout/navigation/navigation.html
  • desktop/angular/src/app/layout/navigation/navigation.scss
  • desktop/angular/src/app/layout/navigation/navigation.ts
  • desktop/angular/src/app/layout/side-dash/side-dash.html
  • desktop/angular/src/app/layout/side-dash/side-dash.ts
  • desktop/angular/src/app/pages/app-view/app-view.html
  • desktop/angular/src/app/pages/app-view/app-view.ts
  • desktop/angular/src/app/pages/app-view/overview.html
  • desktop/angular/src/app/pages/app-view/qs-history/qs-history.component.html
  • desktop/angular/src/app/pages/app-view/qs-history/qs-history.component.ts
  • desktop/angular/src/app/pages/app-view/qs-select-exit/index.ts
  • desktop/angular/src/app/pages/app-view/qs-select-exit/qs-select-exit.html
  • desktop/angular/src/app/pages/app-view/qs-select-exit/qs-select-exit.scss
  • desktop/angular/src/app/pages/app-view/qs-select-exit/qs-select-exit.ts
  • desktop/angular/src/app/pages/app-view/qs-use-splittun/qs-use-splittun.html
  • desktop/angular/src/app/pages/app-view/qs-use-splittun/qs-use-splittun.ts
  • desktop/angular/src/app/pages/app-view/qs-use-spn/index.ts
  • desktop/angular/src/app/pages/app-view/qs-use-spn/qs-use-spn.html
  • desktop/angular/src/app/pages/app-view/qs-use-spn/qs-use-spn.ts
  • desktop/angular/src/app/pages/dashboard/dashboard.component.html
  • desktop/angular/src/app/pages/dashboard/dashboard.component.ts
  • desktop/angular/src/app/pages/dashboard/feature-card/feature-card.component.html
  • desktop/angular/src/app/pages/dashboard/feature-card/feature-card.component.scss
  • desktop/angular/src/app/pages/dashboard/feature-card/feature-card.component.ts
  • desktop/angular/src/app/pages/monitor/monitor.html
  • desktop/angular/src/app/pages/monitor/monitor.ts
  • desktop/angular/src/app/pages/settings/settings.html
  • desktop/angular/src/app/pages/spn/country-details/country-details.html
  • desktop/angular/src/app/pages/spn/country-details/country-details.ts
  • desktop/angular/src/app/pages/spn/country-details/index.ts
  • desktop/angular/src/app/pages/spn/country-overlay/country-overlay.html
  • desktop/angular/src/app/pages/spn/country-overlay/country-overlay.scss
  • desktop/angular/src/app/pages/spn/country-overlay/country-overlay.ts
  • desktop/angular/src/app/pages/spn/country-overlay/index.ts
  • desktop/angular/src/app/pages/spn/index.ts
  • desktop/angular/src/app/pages/spn/map-legend/index.ts
  • desktop/angular/src/app/pages/spn/map-legend/map-legend.html
  • desktop/angular/src/app/pages/spn/map-legend/map-legend.ts
  • desktop/angular/src/app/pages/spn/map-renderer/map-style.scss
  • desktop/angular/src/app/pages/spn/map.service.ts
  • desktop/angular/src/app/pages/spn/node-icon/index.ts
  • desktop/angular/src/app/pages/spn/node-icon/node-icon.html
  • desktop/angular/src/app/pages/spn/node-icon/node-icon.scss
  • desktop/angular/src/app/pages/spn/node-icon/node-icon.ts
  • desktop/angular/src/app/pages/spn/pin-details/index.ts
  • desktop/angular/src/app/pages/spn/pin-details/pin-details.html
  • desktop/angular/src/app/pages/spn/pin-details/pin-details.ts
  • desktop/angular/src/app/pages/spn/pin-list/index.ts
  • desktop/angular/src/app/pages/spn/pin-list/pin-list.html
  • desktop/angular/src/app/pages/spn/pin-list/pin-list.ts
  • desktop/angular/src/app/pages/spn/pin-overlay/index.ts
  • desktop/angular/src/app/pages/spn/pin-overlay/pin-overlay.html
  • desktop/angular/src/app/pages/spn/pin-overlay/pin-overlay.scss
  • desktop/angular/src/app/pages/spn/pin-overlay/pin-overlay.ts
  • desktop/angular/src/app/pages/spn/pin-route/index.ts
  • desktop/angular/src/app/pages/spn/pin-route/pin-route.html
  • desktop/angular/src/app/pages/spn/pin-route/pin-route.scss
  • desktop/angular/src/app/pages/spn/pin-route/pin-route.ts
  • desktop/angular/src/app/pages/spn/spn-feature-carousel/index.ts
  • desktop/angular/src/app/pages/spn/spn-feature-carousel/spn-feature-carousel.html
  • desktop/angular/src/app/pages/spn/spn-feature-carousel/spn-feature-carousel.scss
  • desktop/angular/src/app/pages/spn/spn-feature-carousel/spn-feature-carousel.ts
  • desktop/angular/src/app/pages/spn/spn-page.html
  • desktop/angular/src/app/pages/spn/spn-page.scss
  • desktop/angular/src/app/pages/spn/spn-page.ts
  • desktop/angular/src/app/pages/spn/spn.module.ts
  • desktop/angular/src/app/pages/spn/utils.ts
  • desktop/angular/src/app/pages/support/form/support-form.ts
  • desktop/angular/src/app/pages/support/pages.ts
  • desktop/angular/src/app/services/notifications.types.ts
  • desktop/angular/src/app/services/supporthub.service.ts
  • desktop/angular/src/app/shared/config/generic-setting/generic-setting.html
  • desktop/angular/src/app/shared/config/generic-setting/generic-setting.ts
  • desktop/angular/src/app/shared/config/subsystems.ts
  • desktop/angular/src/app/shared/feature-scout/feature-scout.html
  • desktop/angular/src/app/shared/feature-scout/feature-scout.scss
  • desktop/angular/src/app/shared/feature-scout/feature-scout.ts
  • desktop/angular/src/app/shared/feature-scout/index.ts
  • desktop/angular/src/app/shared/map-renderer/index.ts
  • desktop/angular/src/app/shared/map-renderer/map-renderer.ts
  • desktop/angular/src/app/shared/map-renderer/map-style.scss
  • desktop/angular/src/app/shared/netquery/circular-bar-chart/circular-bar-chart.component.ts
  • desktop/angular/src/app/shared/netquery/connection-details/conn-details.html
  • desktop/angular/src/app/shared/netquery/connection-helper.service.ts
  • desktop/angular/src/app/shared/netquery/netquery.component.html
  • desktop/angular/src/app/shared/netquery/netquery.component.ts
  • desktop/angular/src/app/shared/netquery/netquery.module.ts
  • desktop/angular/src/app/shared/netquery/pipes/country-name.pipe.ts
  • desktop/angular/src/app/shared/network-scout/network-scout.html
  • desktop/angular/src/app/shared/network-scout/network-scout.ts
  • desktop/angular/src/app/shared/security-lock/security-lock.ts
  • desktop/angular/src/app/shared/spn-account-details/index.ts
  • desktop/angular/src/app/shared/spn-account-details/spn-account-details.html
  • desktop/angular/src/app/shared/spn-account-details/spn-account-details.scss
  • desktop/angular/src/app/shared/spn-account-details/spn-account-details.ts
  • desktop/angular/src/app/shared/spn-login/index.ts
  • desktop/angular/src/app/shared/spn-login/spn-login.html
  • desktop/angular/src/app/shared/spn-login/spn-login.scss
  • desktop/angular/src/app/shared/spn-login/spn-login.ts
  • desktop/angular/src/app/shared/spn-network-status/index.ts
  • desktop/angular/src/app/shared/spn-network-status/spn-network-status.html
  • desktop/angular/src/app/shared/spn-network-status/spn-network-status.scss
  • desktop/angular/src/app/shared/spn-network-status/spn-network-status.ts
  • desktop/angular/src/app/shared/spn-status/index.ts
  • desktop/angular/src/app/shared/spn-status/spn-status.html
  • desktop/angular/src/app/shared/spn-status/spn-status.ts
  • desktop/angular/src/environments/environment.prod.ts
  • desktop/angular/src/environments/environment.ts
  • desktop/angular/src/i18n/helptexts.yaml
  • desktop/tauri/src-tauri/Cargo.toml
  • desktop/tauri/src-tauri/src/main.rs
  • desktop/tauri/src-tauri/src/portapi/client.rs
  • desktop/tauri/src-tauri/src/portapi/message.rs
  • desktop/tauri/src-tauri/src/portapi/models/config.rs
  • desktop/tauri/src-tauri/src/portapi/models/mod.rs
  • desktop/tauri/src-tauri/src/portapi/models/spn.rs
  • desktop/tauri/src-tauri/src/portmaster/commands.rs
  • desktop/tauri/src-tauri/src/portmaster/mod.rs
  • desktop/tauri/src-tauri/src/portmaster/notifications.rs
  • desktop/tauri/src-tauri/src/service/systemd.rs
  • desktop/tauri/src-tauri/src/service/windows_service.rs
  • desktop/tauri/src-tauri/src/traymenu.rs
  • desktop/tauri/src-tauri/src/xdg/mod.rs
  • go.mod
  • packaging/linux/postinst
  • packaging/windows/render_nsis_linux.py
  • service/broadcasts/data.go
  • service/broadcasts/notify.go
  • service/broadcasts/notify_test.go
  • service/compat/callbacks.go
  • service/compat/module.go
  • service/compat/module_race_test.go
  • service/compat/notify.go
  • service/compat/selfcheck.go
  • service/config.go
  • service/configure/updates_test.go
  • service/control/api.go
  • service/control/module.go
  • service/control/pause.go
  • service/control/pause_test.go
  • service/core/api.go
  • service/core/api_test.go
  • service/core/update_config.go
  • service/core/update_config_test.go
  • service/debug.go
  • service/debug_test.go
  • service/firewall/api.go
  • service/firewall/api_webview_test.go
  • service/firewall/bandwidth_pending.go
  • service/firewall/bandwidth_pending_test.go
  • service/firewall/config.go
  • service/firewall/decide_bench_test.go
  • service/firewall/default_handler_test.go
  • service/firewall/dns.go
  • service/firewall/inspection/inspection.go
  • service/firewall/interception/dnscache_linux.go
  • service/firewall/interception/dnscache_windows.go
  • service/firewall/interception/dnsmonitor/eventlistener_windows.go
  • service/firewall/interception/dnsmonitor/module.go
  • service/firewall/interception/ebpf/bandwidth/interface.go
  • service/firewall/interception/ebpf/bandwidth/interface_test.go
  • service/firewall/interception/ebpf/connection_listener/worker.go
  • service/firewall/interception/ebpf/exec/exec.go
  • service/firewall/interception/interception_default.go
  • service/firewall/interception/interception_linux.go
  • service/firewall/interception/interception_windows.go
  • service/firewall/interception/nfq/conntrack.go
  • service/firewall/interception/nfq/conntrack_framing_test.go
  • service/firewall/interception/nfq/conntrack_recovery_test.go
  • service/firewall/interception/nfq/conntrack_test.go
  • service/firewall/interception/nfq/nfq.go
  • service/firewall/interception/nfq/nfq_bench_test.go
  • service/firewall/interception/nfq/nfq_test.go
  • service/firewall/interception/nfq/packet.go
  • service/firewall/interception/packet_tracer.go
  • service/firewall/interception/windowskext/packet.go
  • service/firewall/interception/windowskext2/packet.go
  • service/firewall/master.go
  • service/firewall/module.go
  • service/firewall/packet_handler.go
  • service/firewall/packet_handler_test.go
  • service/firewall/preauth.go
  • service/firewall/tunnel.go
  • service/instance.go
  • service/integration/integration_windows.go
  • service/intel/customlists/module.go
  • service/intel/customlists/splitdomain_test.go
  • service/intel/entity.go
  • service/intel/entity_lists_test.go
  • service/intel/entity_loadlists_test.go
  • service/intel/entity_merge_test.go
  • service/intel/entity_publicsuffix_test.go
  • service/intel/entity_test.go
  • service/intel/filterlists/decoder.go
  • service/intel/filterlists/decoder_test.go
  • service/intel/filterlists/lookup.go
  • service/intel/filterlists/lookup_bench_test.go
  • service/intel/geoip/database.go
  • service/intel/geoip/database_test.go
  • service/intel/geoip/lookup.go
  • service/interop/ivpn/evt_handlers.go
  • service/interop/ivpn/hook_default.go
  • service/interop/ivpn/hook_linux.go
  • service/interop/ivpn/hook_windows.go
  • service/interop/ivpn/ivpn.go
  • service/interop/module.go
  • service/mgr/events.go
  • service/mgr/group.go
  • service/mgr/sleepyticker.go
  • service/mgr/sleepyticker_test.go
  • service/mgr/workermgr_test.go
  • service/nameserver/failing.go
  • service/nameserver/failing_test.go
  • service/nameserver/handle_test.go
  • service/nameserver/module.go
  • service/nameserver/nameserver.go
  • service/nameserver/nsutil/nsutil.go
  • service/nameserver/nsutil/nsutil_fuzz_test.go
  • service/nameserver/nsutil/nsutil_test.go
  • service/nameserver/response.go
  • service/nameserver/response_test.go
  • service/netenv/addresses_refresh_test.go
  • service/netenv/location_default.go
  • service/netenv/location_windows.go
  • service/netenv/online-status.go
  • service/netenv/online-status_test.go
  • service/netquery/bandwidth_chart_handler_test.go
  • service/netquery/database.go
  • service/netquery/database_test.go
  • service/netquery/manager.go
  • service/netquery/manager_bench_test.go
  • service/netquery/manager_extradata_test.go
  • service/netquery/manager_lock_test.go
  • service/netquery/manager_push_test.go
  • service/netquery/netquery_open_test.go
  • service/netquery/orm/decoder.go
  • service/netquery/orm/encoder.go
  • service/netquery/orm/encoder_cache_test.go
  • service/netquery/orm/query_runner.go
  • service/netquery/orm/schema_builder.go
  • service/netquery/pagination_test.go
  • service/netquery/query.go
  • service/netquery/query_cancel_test.go
  • service/netquery/query_handler.go
  • service/netquery/query_handler_bench_test.go
  • service/netquery/query_handler_extradata_test.go
  • service/netquery/query_request.go
  • service/netquery/query_test.go
  • service/netquery/runtime_query_runner.go
  • service/netquery/runtime_query_runner_test.go
  • service/netquery/save_bench_test.go
  • service/netquery/save_rows_test.go
  • service/network/api.go
  • service/network/api_race_test.go
  • service/network/api_test.go
  • service/network/clean.go
  • service/network/clean_test.go
  • service/network/connection.go
  • service/network/connection_android.go
  • service/network/connection_handler.go
  • service/network/connection_reuse.go
  • service/network/connection_reuse_test.go
  • service/network/connection_serialization_test.go
  • service/network/connection_unlocked_readers_test.go
  • service/network/connection_verdict_state.go
  • service/network/connection_verdict_state_test.go
  • service/network/database.go
  • service/network/database_test.go
  • service/network/dns.go
  • service/network/dns_test.go
  • service/network/features_test.go
  • service/network/goldenfiles/connection-inbound.dsd-cbor.golden
  • service/network/goldenfiles/connection-inbound.dsd-json.golden
  • service/network/goldenfiles/connection-inbound.dsd-msgpack.golden
  • service/network/goldenfiles/connection-inbound.json.golden
  • service/network/goldenfiles/connection-outbound.dsd-cbor.golden
  • service/network/goldenfiles/connection-outbound.dsd-json.golden
  • service/network/goldenfiles/connection-outbound.dsd-msgpack.golden
  • service/network/goldenfiles/connection-outbound.json.golden
  • service/network/goldenfiles/connection-rerouted.dsd-cbor.golden
  • service/network/goldenfiles/connection-rerouted.dsd-json.golden
  • service/network/goldenfiles/connection-rerouted.dsd-msgpack.golden
  • service/network/goldenfiles/connection-rerouted.json.golden
  • service/network/goldenfiles/connection-undecided.dsd-cbor.golden
  • service/network/goldenfiles/connection-undecided.dsd-json.golden
  • service/network/goldenfiles/connection-undecided.dsd-msgpack.golden
  • service/network/goldenfiles/connection-undecided.json.golden
  • service/network/iphelper/tables.go
  • service/network/module.go
  • service/network/netutils/ip.go
  • service/network/netutils/ip_test.go
  • service/network/packet/info_only.go
  • service/network/packet/packet.go
  • service/network/packet/packetinfo.go
  • service/network/packet/packetinfo_id_test.go
  • service/network/packet/parse.go
  • service/network/packet/parse_fuzz_test.go
  • service/network/packet/parse_test.go
  • service/network/packet/testdata/fuzz/FuzzParseLayer3/4247139be95f73ef
  • service/network/packet/testdata/fuzz/FuzzParseLayer3/f491862c9bd633a3
  • service/network/pidhint_test.go
  • service/network/proc/findpid.go
  • service/network/proc/findpid_test.go
  • service/network/proc/tables.go
  • service/network/proc/tables_test.go
  • service/network/state/exists.go
  • service/network/state/exists_fetch_error_test.go
  • service/network/state/exists_refresh_test.go
  • service/network/state/exists_test.go
  • service/network/state/lookup.go
  • service/network/state/lookup_bench_test.go
  • service/network/state/lookup_first_try_test.go
  • service/network/state/tcp.go
  • service/network/state/udp.go
  • service/network/state/udp_test.go
  • service/process/api.go
  • service/process/api_race_test.go
  • service/process/createtime_linux.go
  • service/process/createtime_linux_test.go
  • service/process/createtime_other.go
  • service/process/database.go
  • service/process/executable.go
  • service/process/find.go
  • service/process/find_bench_test.go
  • service/process/module.go
  • service/process/primary_profile_id_race_test.go
  • service/process/process.go
  • service/process/profile.go
  • service/process/profile_race_test.go
  • service/profile/binmeta/name.go
  • service/profile/binmeta/name_test.go
  • service/profile/config-update.go
  • service/profile/config-update_test.go
  • service/profile/config.go
  • service/profile/endpoints/endpoint-domain.go
  • service/profile/endpoints/endpoint-scopes.go
  • service/profile/endpoints/endpoint.go
  • service/profile/endpoints/endpoint_fuzz_test.go
  • service/profile/endpoints/endpoint_portrange_test.go
  • service/profile/endpoints/endpoint_test.go
  • service/profile/endpoints/endpoints_bench_test.go
  • service/profile/endpoints/endpoints_test.go
  • service/profile/endpoints/reason_test.go
  • service/profile/migrations.go
  • service/profile/migrations_test.go
  • service/profile/profile-layered.go
  • service/profile/profile-layered_test.go
  • service/profile/profile.go
  • service/resolver/failing_test.go
  • service/resolver/ipinfo.go
  • service/resolver/ipinfo_test.go
  • service/resolver/localhooks_race_test.go
  • service/resolver/main.go
  • service/resolver/main_test.go
  • service/resolver/namerecord.go
  • service/resolver/nameserver_config_test.go
  • service/resolver/resolve_bench_test.go
  • service/resolver/resolver-mdns.go
  • service/resolver/resolver-mdns_test.go
  • service/resolver/resolver-plain.go
  • service/resolver/resolver-plain_retransmit_test.go
  • service/resolver/resolver-plain_test.go
  • service/resolver/resolver-tcp.go
  • service/resolver/resolver-tcp_dialfail_test.go
  • service/resolver/resolver-tcp_restart_test.go
  • service/resolver/resolver-tcp_test.go
  • service/resolver/resolver.go
  • service/resolver/resolver_test.go
  • service/resolver/rrcache.go
  • service/resolver/rrcache_test.go
  • service/resolver/scopes.go
  • service/resolver/scopes_icann_test.go
  • service/splittun/proxy/tcp_idle_test.go
  • service/splittun/proxy/tcp_proxy.go
  • service/splittun/proxy/udp_idle_test.go
  • service/splittun/proxy/udp_proxy.go
  • service/status/status.go
  • service/status/status_test.go
  • service/sync/profile.go
  • service/sync/profile_test.go
  • service/sync/setting_single.go
  • service/sync/settings.go
  • service/sync/settings_nilconfig_test.go
  • service/ui/module.go
  • service/ui/serve.go
  • service/ui/serve_test.go
  • service/updates/downloader.go
  • service/updates/downloader_retry_test.go
  • service/updates/downloader_stall_test.go
  • service/updates/force_update_test.go
  • service/updates/index.go
  • service/updates/missing_resources_test.go
  • service/updates/module.go
  • service/updates/readonly_test.go
  • service/updates/rollback_test.go
  • service/updates/signature_test.go
  • service/updates/updates_test.go
  • service/updates/upgrade.go
  • service/updates/upgrade_marker_test.go
  • service/updates/upgrade_test.go
  • spn/access/account/auth.go
  • spn/access/account/client.go
  • spn/access/account/types.go
  • spn/access/account/view.go
  • spn/access/api.go
  • spn/access/client.go
  • spn/access/client_test.go
  • spn/access/compatibility.go
  • spn/access/database.go
  • spn/access/features.go
  • spn/access/module.go
  • spn/access/module_test.go
  • spn/access/notify.go
  • spn/access/op_auth.go
  • spn/access/storage.go
  • spn/access/token/pblind.go
  • spn/access/token/pblind_compressed_test.go
  • spn/access/token/pblind_msgpack_test.go
  • spn/access/token/pblind_verify_test.go
  • spn/access/token/request.go
  • spn/access/zones.go
  • spn/cabin/keys.go
  • spn/cabin/verification.go
  • spn/cabin/verification_compressed_test.go
  • spn/cabin/verification_msgpack_test.go
  • spn/captain/client.go
  • spn/captain/config.go
  • spn/captain/op_publish.go
  • spn/captain/op_publish_test.go
  • spn/crew/connect.go
  • spn/crew/connect_route_test.go
  • spn/crew/connect_test.go
  • spn/crew/module_test.go
  • spn/crew/op_compressed_test.go
  • spn/crew/op_connect.go
  • spn/crew/op_connect_test.go
  • spn/crew/op_msgpack_test.go
  • spn/crew/op_ping.go
  • spn/crew/sticky.go
  • spn/docks/crane.go
  • spn/docks/crane_bench_test.go
  • spn/docks/crane_init.go
  • spn/docks/crane_letter_test.go
  • spn/docks/crane_load_test.go
  • spn/docks/crane_test.go
  • spn/docks/op_capacity.go
  • spn/docks/op_capacity_test.go
  • spn/docks/op_compressed_test.go
  • spn/docks/op_expand.go
  • spn/docks/op_sync_state.go
  • spn/docks/op_whoami.go
  • spn/docks/terminal_expansion.go
  • spn/docks/terminal_expansion_fail_test.go
  • spn/docks/terminal_expansion_test.go
  • spn/hub/database.go
  • spn/hub/hub.go
  • spn/hub/hubid_test.go
  • spn/hub/intel.go
  • spn/hub/msg_fuzz_test.go
  • spn/hub/status.go
  • spn/hub/status_nil_test.go
  • spn/hub/testdata/fuzz/FuzzOpenHubMsg/nil_signature
  • spn/hub/testdata/fuzz/FuzzOpenHubMsg/nil_tofu_key
  • spn/hub/testdata/fuzz/FuzzParseTransport/c2d07ff165cf1d4b
  • spn/hub/transport_fuzz_test.go
  • spn/hub/update.go
  • spn/hub/update_compressed_test.go
  • spn/hub/update_msgpack_test.go
  • spn/hub/update_panic_test.go
  • spn/navigator/api.go
  • spn/navigator/api_route.go
  • spn/navigator/database.go
  • spn/navigator/map_test.go
  • spn/navigator/module.go
  • spn/navigator/optimize.go
  • spn/navigator/optimize_test.go
  • spn/navigator/options.go
  • spn/navigator/pin.go
  • spn/navigator/pin_export.go
  • spn/navigator/pin_failing_test.go
  • spn/navigator/routing-profiles.go
  • spn/navigator/state.go
  • spn/navigator/update.go
  • spn/peerdsd/msgpack.go
  • spn/peerdsd/msgpack_test.go
  • spn/peerdsd/peerdsd.go
  • spn/peerdsd/peerdsd_test.go
  • spn/ships/connection_test.go
  • spn/ships/http.go
  • spn/ships/http_shared.go
  • spn/ships/http_shared_test.go
  • spn/ships/http_test.go
  • spn/ships/testship.go
  • spn/sluice/abandon_test.go
  • spn/sluice/lifecycle_test.go
  • spn/sluice/listener_test.go
  • spn/sluice/packet_listener.go
  • spn/sluice/sluice.go
  • spn/sluice/sluice_test.go
  • spn/sluice/udp_listener.go
  • spn/terminal/block.go
  • spn/terminal/block_test.go
  • spn/terminal/control_flow.go
  • spn/terminal/control_flow_test.go
  • spn/terminal/init.go
  • spn/terminal/init_compressed_test.go
  • spn/terminal/letter.go
  • spn/terminal/letter_test.go
  • spn/terminal/metrics.go
  • spn/terminal/module.go
  • spn/terminal/msg.go
  • spn/terminal/msgtypes.go
  • spn/terminal/msgtypes_test.go
  • spn/terminal/operation.go
  • spn/terminal/operation_counter.go
  • spn/terminal/operation_counter_test.go
  • spn/terminal/operation_test.go
  • spn/terminal/rng_feeder_restart_test.go
  • spn/terminal/scheduler_restart_test.go
  • spn/terminal/terminal.go
  • spn/terminal/terminal_bench_test.go
  • spn/terminal/unit_leak_test.go
  • spn/unit/scheduler.go
  • spn/unit/scheduler_stop_test.go
  • spn/unit/unit_debug.go
  • tools/vmtest/README.md
  • tools/vmtest/build-tests.sh
  • tools/vmtest/common.sh
  • tools/vmtest/linux/smoke.sh
  • tools/vmtest/linux/soak.sh
  • tools/vmtest/linux/vm.sh
  • tools/vmtest/proxmox.sh
  • tools/vmtest/run-tests.ps1
  • tools/vmtest/run-tests.sh
  • tools/vmtest/test-linux.sh
  • tools/vmtest/test-windows.sh
  • tools/vmtest/windows/autounattend.xml.in
  • tools/vmtest/windows/smoke-task.ps1
  • tools/vmtest/windows/smoke.ps1
  • tools/vmtest/windows/soak.ps1
  • tools/vmtest/windows/vm.sh
  • tools/vmtest/windows/vmtest-setup.ps1
  • windows_core_dll/windows_core_dll.vcxproj

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@0n113
0n113 deleted the fix/profile-filterlists-first-start branch November 20, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants